home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / MacRuntime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  1.8 KB  |  74 lines  |  [TEXT/MPS ]

  1. /*
  2.  *    MacRuntime.h
  3.  *
  4.  * Portions copyright American Telephone & Telegraph
  5.  * Used with permission, Apple Computer Inc. (1985,1988,1990,1992-1994)
  6.  * All rights reserved.
  7.  *
  8.  * Warning:  This interface is NOT a part of the ANSI C standard.
  9.  *             We do NOT claim to be POSIX compliant.
  10.  *             If you want your code to be portable, don't use this interface.
  11.  */
  12.  
  13. /* Conditional Macros:
  14.  *    UsingStaticLibs    - for CFM-68K:  Insures that #pragma lib_export is never used.
  15.  *    UsingSharedLibs    - for CFM-68K:  Insures that all functions and data items are
  16.  *                                    marked as exported
  17.  *    <none>            - for CFM-68K:    Data items are exported using #pragma lib_export,
  18.  *                                    functions are not.  Causes excess code to be
  19.  *                                    generated for data references to static libraries
  20.  *                                    and causes the linker to generate glue for
  21.  *                                    references to shared library routines.
  22.  *    The preceeding macros may not both be defined in the same compilation.
  23.  */
  24.  
  25. #ifndef __MACRUNTIME__
  26. #define __MACRUNTIME__    1
  27.  
  28. #if defined (UsingStaticLibs) && defined (UsingSharedLibs)
  29.     #error "Only one of the conditional macros 'UsingStaticLibs' and 'UsingSharedLibs' may be defined in a compilation"
  30. #endif
  31.  
  32. #pragma once
  33.  
  34. #ifndef __TYPES__
  35. #include <types.h>
  36. #endif
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. /* Global Variables */
  43.  
  44. #ifdef __CFM68K__
  45.     #ifndef UsingStaticLibs
  46.         #pragma lib_export on
  47.         #define    _EXP_ON_
  48.     #endif
  49. #endif
  50.  
  51. extern    int    StandAlone;
  52.  
  53. extern    short    MacOSErr;        /* moved here from errors.h • rjd 941017 */
  54.  
  55. #ifdef __CFM68K__
  56.     #if !defined(UsingSharedLibs) && defined(_EXP_ON_)
  57.         #pragma lib_export off
  58.         #undef    _EXP_ON_
  59.     #endif
  60. #endif
  61.  
  62. /* Utility Routines */
  63.  
  64. pascal Boolean TrapAvailable (short TrapNumber);
  65.  
  66. #ifdef _EXP_ON_
  67.     #pragma lib_export off
  68.     #undef _EXP_ON_
  69. #endif
  70.  
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif